programming4us
           
 
 
Windows

Windows 7 : Working with Registry Entries (part 3)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/3/2010 2:41:48 PM
Creating a .reg File

You can create registration files from scratch and then import them into the Registry. This is a handy technique if you have some customizations that you want to apply to multiple systems. To demonstrate the basic structure of a registration file and its entries, Figure 5 shows two windows. The top window is the Registry Editor with a key named Test highlighted. The Settings pane contains six sample settings: the (Default) value and one each of the five types of settings (binary, DWORD, expandable string, multistring, and string). The bottom window shows the Test key in Notepad as an exported registration file (Test.reg).

Figure 5. The settings in the Test key shown in the Registry Editor correspond to the data shown in Test.reg file shown in Notepad.


Note

The file that contains the test Registry code (test.reg) is available on my website at www.mcfedries.com/Windows7Unleashed.


Windows 7 registration files always start with the following header:

Windows Registry Editor Version 5.00

Tip

If you’re building a registration file for a Windows 9x, Me, or NT 4 system, change the header to the following:

REGEDIT4


Next is an empty line followed by the full path of the Registry key that will hold the settings you’re adding, surrounded by square brackets:

[HKEY_CURRENT_USER\Test]

Below the key are the setting names and values, which use the following general form:

Tip

If you want to add a comment to a .reg file, start a new line and begin the line with a semicolon (;).


"SettingName"=identifier:SettingValue

SettingNameThe name of the setting. Note that you use the @ symbol to represent the key’s Default value.
identifierA code that identifies the type of data. REG_SZ values don’t use an identifier, but the other four types do:
  dwordUse this identifier for a DWORD value.
  hex(b)Use this identifier for a QWORD value.
  hexUse this identifier for a binary value.
  hex(2)Use this identifier for an expandable string value.
  hex(7)Use this identifier for a multistring value.
SettingValueThis is the value of the setting, which you enter as follows:
  StringSurround the value with quotation marks.
  DWORDEnter an eight-digit DWORD value.
  QWORDEnter eight two-digit hexadecimal pairs, separated by commas, with the pairs running from highest order to lowest. For example, to enter the QWORD value 123456789abcd, you would use the following value:
   cd,ab,89,67,45,23,01,00
  BinaryEnter the binary value as a series of two-digit hexadecimal numbers, separating each number with a comma.
  Expandable stringConvert each character to its hexadecimal equivalent and then enter the value as a series of two-digit hexadecimal numbers, separating each number with a comma, and separating each character with 00.
  MultistringConvert each character to its hexadecimal equivalent and then enter the value as a series of two-digit hexadecimal numbers, separating each number with a comma, and separating each character with 00, and separating each string with space (00 hex).

Tip

To delete a setting using a .reg file, set its value to a hyphen (-), as in this example:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Test]
"BinarySetting"=-

To delete a key, add a hyphen to the start of the key name, as in this example:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Test]


Renaming a Key or Setting

You won’t often need to rename existing keys or settings. Just in case, though, here are the steps to follow:

1.
In the Registry Editor, find the key or setting you want to work with, and then highlight it.

2.
Select Edit, Rename, or press F2.

3.
Edit the name and then press Enter.

Caution

Rename only those keys or settings that you created yourself. If you rename any other key or setting, Windows 7 might not work properly.


Creating a New Key or Setting

Many Registry-based customizations don’t involve editing an existing setting or key. Instead, you have to create a new setting or key. Here’s how you do it:

1.
In the Registry Editor, select the key in which you want to create the new subkey or setting.

2.
Select Edit, New. (Alternatively, right-click an empty section of the Settings pane and then click New.) A submenu appears.

3.
If you’re creating a new key, select the Key command. Otherwise, select the command that corresponds to the type of setting you want: String Value, Binary Value, DWORD Value, Multi-String Value, or Expandable String Value.

4.
Type a name for the new key or setting.

5.
Press Enter.

Deleting a Key or Setting

Here are the steps to follow to delete a key or setting:

1.
In the Registry Editor, select the key or setting that you want to delete.

2.
Select Edit, Delete, or press Delete. The Registry Editor asks whether you’re sure.

3.
Click Yes.

Caution

Again, to avoid problems, you should delete only those keys or settings that you created yourself. If you’re not sure about deleting a setting, try renaming it instead. If a problem arises, you can also return the setting back to its original name.


Other -----------------
- Windows 7 : Keeping the Registry Safe
- Windows 7 : Getting to Know the Registry (part 2)
- Windows 7 : Getting to Know the Registry (part 1) - Understanding Registry Settings
- Windows 7 : Firing Up the Registry Editor
- Windows Azure : Managing Access Control Service Resources (part 2)
- Windows Azure : Managing Access Control Service Resources (part 1)
- Windows Azure : Access Control Service Management Portal
- Windows 7 : Reset a Broken Service
- Windows 7 : Make Windows Shut Down Services Faster
- Windows 7 : Disable Services for Faster Performance
- Windows 7 : Controlling Services with a Script
- Windows 7 : Controlling Services at the Command Prompt
- Windows 7 : Controlling Services with the Services Snap-In
- Windows Azure : Access Control Service Usage Scenarios (part 3)
- Windows Azure : Access Control Service Usage Scenarios (part 2)
- Windows Azure : Access Control Service Usage Scenarios (part 1)
- Windows Azure : Access Control Service - Claims-Based Identity Model
- Windows Azure : Access Control Service - Concepts and Terminology
- Windows 7 : Configuring the MMC - Creating a Custom Taskpad View
- Windows 7 : Configuring the MMC - Controlling Snap-Ins with Group Policies
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us